package v1

type DataflowApp struct {
	Name      string            `json:"name"`
	Namespace string            `json:"namespace"`
	Status    DataflowAppStatus `json:"status"`
}

type DataflowAppStatus struct {
	//from k8s
	NodeName  string  `json:"nodeName"`
	HostIP    string  `json:"hostIP"`
	PodIP     string  `json:"podIP"`
	StartTime int64   `json:"startTime"`
	PodPhase  string  `json:"podPhase"`
	CPU       float64 `json:"cpu"`
	Memory    float64 `json:"memory"`
	Time      int64   `json:"time"`
}

type CPUUsage struct {
	Cores   float64 `json:"cores"`
	Percent float64 `json:"percent"`
}

type MemoryUsage struct {
	Bytes   string `json:"bytes"`
	Percent string `json:"percent"`
}

type DataflowAppList struct {
	Items []DataflowApp `json:"items"`
}

const (
	DataflowPodLabelKey = "app.daq.ihep/component"
	DataflowNamespace   = ""
)

var (
	DataflowPodLabelVals = []string{"ros", "eb", "ps", "es", "dfm"}
)

func UpdateApps(apps *DataflowAppList) {
}
